home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
Tools
/
glimpse-2.1
/
Makefile.alpha
< prev
next >
Wrap
Makefile
|
1995-05-16
|
6KB
|
159 lines
# Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved.
# To complie for structured queries, make "all: Sall" and "STRUCTURED_QUERIES=1".
#STRUCTURED_QUERIES = 0
STRUCTURED_QUERIES = 1
#all: NOTSall
all: Sall
# Define DIRENT to be 1 when you don't have <sys/dir.h> else define it to be 0.
DIRENT = 1
# Define UTIME to be 1 if you have the utime() routine on your system. Else define it to be 0.
UTIME = 1
# You might have to change this depending on your machine configuration.
CC = cc #gcc -traditional #cc
SHELL = /bin/sh
# YOU DON'T HAVE TO CHANGE ANYTHING BELOW THIS LINE
# The binaries will be made in ./bin/. and the libraries are assumed to
# be in ./lib . You normally don't have to change them.
# NOTE: GLIMPSEDIR can be relative or absolute.
GLIMPSEDIR = ..
BINDIR = bin
AGREPDIR = agrep
INDEXDIR = index
COMPRESSDIR = compress
TEMPLATEDIR = libtemplate
LIBDIR = lib
LIBTEMPLATEDIR = $(TEMPLATEDIR)/lib
LIBAGREP = agrep
LIBCOMPRESS = cast
LIBTEMPLATE = template
LIBUTIL = util
PROG = glimpse
PROGSERVER = glimpseserver
NOTSPROG = nots$(PROG)
NOTSPROGSERVER = nots$(PROGSERVER)
PROGINDEX = index/glimpseindex
PROGAGREP = agrep/agrep
CFLAGS = -c -I$(INDEXDIR) -I$(AGREPDIR) -I$(TEMPLATEDIR)/include -O -Olimit 3000 #-p #-g #-DBG_DEBUG=1 #-DDEBUG=1
LINKFLAGS = -I$(INDEXDIR) -I$(AGREPDIR) -I$(TEMPLATEDIR)/include #-p
OBJS = get_filename.o \
get_index.o \
split.o \
$(INDEXDIR)/region.o \
$(INDEXDIR)/getword.o \
$(INDEXDIR)/build_in.o \
$(INDEXDIR)/filetype.o \
$(INDEXDIR)/simpletest.o \
$(INDEXDIR)/memlook.o \
$(INDEXDIR)/lib.o\
$(INDEXDIR)/io.o
HDRS = $(INDEXDIR)/glimpse.h $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(AGREPDIR)/re.h $(INDEXDIR)/region.h
SRC = main.c \
get_filename.c \
get_index.c \
split.c \
$(INDEXDIR)/region.c \
$(INDEXDIR)/getword.c \
$(INDEXDIR)/build_in.c \
$(INDEXDIR)/filetype.c \
$(INDEXDIR)/simpletest.c \
$(INDEXDIR)/memlook.c \
$(INDEXDIR)/io.c
Sall: $(PROGINDEX) $(PROGAGREP) $(PROG) $(PROGSERVER)
NOTSall: $(PROGINDEX) $(PROGAGREP) $(NOTSPROG) $(NOTSPROGSERVER)
$(PROGINDEX): $(PROGAGREP) $(LIBDIR)/lib$(LIBAGREP).a $(LIBTEMPLATEDIR)/lib$(LIBTEMPLATE).a $(LIBTEMPLATEDIR)/lib$(LIBUTIL).a $(LIBDIR)/lib$(LIBCOMPRESS).a
cd $(INDEXDIR) ; $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
$(PROGAGREP): $(LIBDIR)/lib$(LIBCOMPRESS).a
cd $(AGREPDIR) ; $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
$(LIBDIR)/lib$(LIBCOMPRESS).a:
cd $(COMPRESSDIR); $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
$(PROG): main.o $(OBJS) $(SRC) $(HDRS) $(LIBDIR)/lib$(LIBAGREP).a $(LIBTEMPLATEDIR)/lib$(LIBTEMPLATE).a $(LIBTEMPLATEDIR)/lib$(LIBUTIL).a $(LIBDIR)/lib$(LIBCOMPRESS).a
$(CC) $(LINKFLAGS) -L$(LIBDIR) -L$(LIBTEMPLATEDIR) -o $(PROG) main.o $(OBJS) -l$(LIBAGREP) -l$(LIBTEMPLATE) -l$(LIBUTIL) -l$(LIBCOMPRESS)
cp $(PROG) $(BINDIR)
$(NOTSPROG): main.o $(OBJS) $(SRC) $(HDRS) $(LIBDIR)/lib$(LIBAGREP).a $(LIBDIR)/lib$(LIBCOMPRESS).a
$(CC) $(LINKFLAGS) -L$(LIBDIR) -o $(PROG) main.o $(OBJS) -l$(LIBAGREP) -l$(LIBCOMPRESS)
cp $(PROG) $(BINDIR)
$(PROGSERVER): main_server.o $(OBJS) $(SRC) $(HDRS) $(LIBDIR)/lib$(LIBAGREP).a $(LIBTEMPLATEDIR)/lib$(LIBTEMPLATE).a $(LIBTEMPLATEDIR)/lib$(LIBUTIL).a $(LIBDIR)/lib$(LIBCOMPRESS).a
$(CC) $(LINKFLAGS) -L$(LIBDIR) -L$(LIBTEMPLATEDIR) -o $(PROGSERVER) main_server.o $(OBJS) -l$(LIBAGREP) -l$(LIBTEMPLATE) -l$(LIBUTIL) -l$(LIBCOMPRESS)
cp $(PROGSERVER) $(BINDIR)
$(NOTSPROGSERVER): main_server.o $(OBJS) $(SRC) $(HDRS) $(LIBDIR)/lib$(LIBAGREP).a $(LIBDIR)/lib$(LIBCOMPRESS).a
$(CC) $(LINKFLAGS) -L$(LIBDIR) -o $(PROGSERVER) main_server.o $(OBJS) -l$(LIBAGREP) -l$(LIBCOMPRESS)
cp $(PROGSERVER) $(BINDIR)
$(LIBTEMPLATEDIR)/lib$(LIBTEMPLATE).a:
cd $(TEMPLATEDIR) ; $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
$(LIBTEMPLATEDIR)/lib$(LIBUTIL).a:
cd $(TEMPLATEDIR) ; $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
$(LIBDIR)/lib$(LIBAGREP).a:
cd $(AGREPDIR); $(MAKE) -f Makefile.alpha #CC=$(CC) DIRENT=$(DIRENT) UTIME=$(UTIME)
clean:
-rm -f main_server.o main_server.c main.o $(OBJS) core a.out $(LIBDIR)/lib$(LIBAGREP).a $(PROG) $(PROGSERVER)
cd $(AGREPDIR); $(MAKE) clean
cd $(INDEXDIR) ; $(MAKE) clean
cd $(COMPRESSDIR); $(MAKE) clean
main_server.o: main.c defs.h $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(INDEXDIR)/glimpse.h
cp main.c main_server.c
$(CC) $(CFLAGS) -DISSERVER=1 -o $@ main_server.c
main.o: main.c defs.h $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -DISSERVER=0 -o $@ main.c
get_filename.o: get_filename.c $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ get_filename.c
get_index.o: get_index.c $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ get_index.c
split.o: split.c $(AGREPDIR)/agrep.h $(AGREPDIR)/checkfile.h $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ split.c
$(INDEXDIR)/lib.o: $(INDEXDIR)/lib.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/lib.c
$(INDEXDIR)/io.o: $(INDEXDIR)/io.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/io.c
$(INDEXDIR)/region.o: $(INDEXDIR)/region.c $(INDEXDIR)/glimpse.h $(INDEXDIR)/region.h
$(CC) $(CFLAGS) -DSTRUCTURED_QUERIES=$(STRUCTURED_QUERIES) -o $@ $(INDEXDIR)/region.c
$(INDEXDIR)/getword.o: $(INDEXDIR)/getword.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/getword.c
$(INDEXDIR)/build_in.o: $(INDEXDIR)/build_in.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/build_in.c
$(INDEXDIR)/filetype.o: $(INDEXDIR)/filetype.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/filetype.c
$(INDEXDIR)/simpletest.o: $(INDEXDIR)/simpletest.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/simpletest.c
$(INDEXDIR)/memlook.o: $(INDEXDIR)/memlook.c $(INDEXDIR)/glimpse.h
$(CC) $(CFLAGS) -o $@ $(INDEXDIR)/memlook.c